package cn.b.sky.form.service;

import cn.b.sky.common.model.BatchJobReport;
import cn.b.sky.common.model.Page;
import cn.b.sky.form.model.BusinessField;
import cn.b.sky.form.model.BusinessFieldValue;
import cn.b.sky.form.model.condition.BusinessFieldCondition;

import java.util.List;

/**
 * 
 * <strong>Title : BusinessFieldService<br></strong>
 * <strong>Package : cn.b.sky.flowable.service<br></strong>
 * <strong>Description : </strong>业务字段操作业务类接口<br> 
 * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
 * <p>
 * @author JunLin.Yang<br>
 * @version <strong>v1.0.0</strong>
 */
public interface BusinessFieldService {
  
  /**
   * 
   * <strong>Title : getBusinessFieldAndValues<br></strong>
   * <strong>Description : </strong>根据主键查询业务字段对象及其相关选项值<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param businessType 业务类型
   * @param siteCode 工厂编号
   * @param businessField 业务字段
   * @return
   * BusinessField 业务字段对象
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public BusinessField getBusinessFieldAndValues(String siteCode, String businessType, String businessField);

  /**
   * 
   * <strong>Title : insertBusinessFieldAndValues<br></strong>
   * <strong>Description : </strong>新增业务字段数据及其选项值<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param data 业务字段
   * @return
   * int 新增记录数
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public int insertBusinessFieldAndValues(BusinessField data);

  /**
   * 
   * <strong>Title : updateBusinessFieldAndValues<br></strong>
   * <strong>Description : </strong>更新业务字段数据及其选项值<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param data 业务字段
   * @return
   * int 更新的记录数
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public int updateBusinessFieldAndValues(BusinessField data);

  /**
   * 
   * <strong>Title : insertBusinessField<br></strong>
   * <strong>Description : </strong>新增业务字段数据<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param data 业务字段
   * @return
   * int 新增记录数
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public int insertBusinessField(BusinessField data);

  /**
   * 
   * <strong>Title : updateBusinessField<br></strong>
   * <strong>Description : </strong>更新业务字段数据<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param data 业务字段
   * @return
   * int 更新的记录数
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public int updateBusinessField(BusinessField data);

  /**
   * 
   * <strong>Title : deleteBusinessField<br></strong>
   * <strong>Description : </strong>删除业务字段数据<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param data 业务字段
   * @return
   * BatchJobReport 执行结果信息对象
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public BatchJobReport deleteBusinessField(BusinessField data);

  /**
   * 
   * <strong>Title : getBusinessFieldsCount<br></strong>
   * <strong>Description : </strong>查询所有的业务字段数据记录数<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @return
   * long 数据记录数
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public long getBusinessFieldsCount();

  /**
   * 
   * <strong>Title : selectBusinessFields<br></strong>
   * <strong>Description : </strong>查询所有的业务字段数据<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @return
   * List<BusinessField> 所有的业务字段数据
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public List<BusinessField> selectBusinessFields(String siteCode, String businessType);

  /**
   * 
   * <strong>Title : deleteBusinessFieldByPrimaryKey<br></strong>
   * <strong>Description : </strong>根据主键信息删除业务字段数据<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
  * @param businessType 业务类型
  * @param siteCode 工厂编号
  * @param businessField 业务字段
  * @return
   * BatchJobReport 执行结果信息对象
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public BatchJobReport deleteBusinessFieldByPrimaryKey(String siteCode, String businessType, String businessField);

  /**
   * 
   * <strong>Title : getBusinessFieldByPrimaryKey<br></strong>
   * <strong>Description : </strong>根据主键查询业务字段对象<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param businessType 业务类型
   * @param siteCode 工厂编号
   * @param businessField 业务字段
   * @return
   * BusinessField 业务字段对象
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public BusinessField getBusinessFieldByPrimaryKey(String siteCode, String businessType, String businessField);

  /**
   * 
   * <strong>Title : existBusinessFieldByPrimaryKey<br></strong>
   * <strong>Description : </strong>根据主键查询业务字段对象是否存在<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param businessType 业务类型
   * @param siteCode 工厂编号
   * @param businessField 业务字段
   * @return
   * boolean 数据是否存在
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public boolean existBusinessFieldByPrimaryKey(String siteCode, String businessType, String businessField);

  /**
   * 
   * <strong>Title : existsBusinessFieldByCondition<br></strong>
   * <strong>Description : </strong>根据查询对象查询业务字段数据是否存在<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param condition 业务字段查询对象
   * boolean 数据是否存在
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public boolean existsBusinessFieldByCondition(BusinessFieldCondition condition);

  /**
   * 
   * <strong>Title : getBusinessFieldByCondition<br></strong>
   * <strong>Description : </strong>根据查询条件查询对应业务字段对象<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param condition 业务字段查询条件
   * @return
   * BusinessField 业务字段对象
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public BusinessField getBusinessFieldByCondition(BusinessFieldCondition condition);

  /**
   * 
   * <strong>Title : selectBusinessFieldsByCondition<br></strong>
   * <strong>Description : </strong>根据查询条件查询业务字段集合<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param condition 业务字段查询条件
   * @return 
   * List<BusinessField> 业务字段集合
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public List<BusinessField> selectBusinessFieldsByCondition(BusinessFieldCondition condition);

  /**
   * 
   * <strong>Title : selectBusinessFieldPageDataByCondition<br></strong>
   * <strong>Description : </strong>根据查询条件查询相应分页的业务字段集合<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param condition 业务字段查询条件
   * @return 
   * List<BusinessField> 业务字段集合
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public List<BusinessField> selectBusinessFieldPageDataByCondition(BusinessFieldCondition condition);

  /**
   * 
   * <strong>Title : selectBusinessFieldPageByCondition<br></strong>
   * <strong>Description : </strong>根据查询条件查询相应业务字段分页信息<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param condition 业务字段查询条件
   * @return 
   * List<BusinessField> 业务字段分页信息
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public Page selectBusinessFieldPageByCondition(BusinessFieldCondition condition);

  /**
   * 
   * <strong>Title : getBusinessFieldsCountByCondition<br></strong>
   * <strong>Description : </strong>根据查询条件查询相应的业务字段记录数<br> 
   * <strong>Create on : 2016-09-27 下午07:18:57<br></strong>
   * <p>
   * @param condition 业务字段查询条件
   * @return
   * long 数据记录数
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public long getBusinessFieldsCountByCondition(BusinessFieldCondition condition);
  
  public List<BusinessField> getOnBusinessField(BusinessFieldCondition condition);

  public int getOnBusinessFieldCount(BusinessFieldCondition condition);
  
  /**
   * 
   * <strong>Title : getBusinessFieldValueByPrimaryKey<br></strong>
   * <strong>Description : </strong>根据主键查询字段选项值对象<br> 
   * <strong>Create on : 2016-09-27 下午09:48:43<br></strong>
   * <p>
   * @param siteCode 工厂编号
   * @param businessType 业务类型
   * @param businessField 字段选项值
   * @param value 选项值
   * @return
   * BusinessFieldValue 字段选项值对象
   * @throws 
   * @author JunLin.Yang<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public BusinessFieldValue getBusinessFieldValueByPrimaryKey(String siteCode, String businessType, String businessField, String value);

}
